package com.zhuiyun.pm.sys.dictionary.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName DictionaryEntriesEntity
 * @Description 字典项表
 * @Author 胡亮
 * @Date 2023/03/14 上午 08:21
 **/
@Data
@Table(name = "sys_dictionary_entries")
public class DictionaryEntriesEntity implements Serializable {
    //字典项主键id
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Integer id;
    //字典项类型(编码)
    private String dictionaryEntriesTypeEncoded;
    //字典项数据值
    private String dictionaryEntriesPrice;
    //字典项标签名
    private String dictionaryEntriesName;
    //字典项描述
    private String dictionaryEntriesDescribe;
    //字典项排序
    @Column(name = "dictionary_entries_sort")
    private Integer dictionaryEntriesSort;
    //字典项数据类型表id(外键)
    private Integer dictionaryEntriesTypeId;
    //字典项备注
    private String dictionaryEntriesRemarks;
    //字典项创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//JsonFormat是出参格式化。
    private Date dictionaryEntriesCreateTime;
    //字典项修改时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//JsonFormat是出参格式化。
    private Date dictionaryEntriesUpdateTime;
    //字典表id
    private Integer dictionaryId;
    //字典项状态(1为未删除，0为删除)
    private Integer dictionaryEntriesDelFlag;

    @Transient
    //字典项数据类型名(字典项数据类型表参数)
    private String dictionaryEntriesTypeName;
}
